<!DOCTYPE html>
<html>
	<?php
	echo $this->render('common/header.phtml');?>
	<body>
	    <div class="bg">
		<?php
		echo $this->render('common/navi.phtml');
		?>
		<?php
		$modelListTable = Zend_Registry::get('database')->modellist;
		$config = Zend_Registry::get('config')->model;
		$model = $this->model;
		?>
		<div class="model-box model-self">
		    <a href="/<?php echo $config->{'type' . $model[$modelListTable->type]}; ?>?column=<?php echo $this->column; ?>" class="back"></a>
			<div class="model-self-des">
				<?php echo $model['description'];?>
			</div>
			<div class="pre-bt-box">
				<a href="###" class="pre-bt"></a>
			</div>
			<div class="model-self-column">
				<div class="model-self-inner">
					<ul>
						<?php
						$pictures = unserialize($model[$modelListTable->pictures]);
					    $pictureSizes = unserialize($model[$modelListTable->pictureSize]);
						$len = count($pictures);
						for ($i = 0; $i < $len; $i++) {
                            $picture = $pictures[$i];
                            $pictureSize = $pictureSizes[$i];
                            $width = round(400*($pictureSize['width'] / $pictureSize['height']));
						?>
						<li style="width: <?php echo $width + 31;?>px">
							<a href="###"><img style="width: <?php echo $width?>px" src="<?php echo $picture;?>" height="400" width="<?php echo $width; ?>" originalWidth="<?php echo $pictureSize['width'];?>" originalHeight="<?php echo $pictureSize['height'];?>"/></a>
						</li>
						<?php
						}
						?>
					</ul>
				</div>
			</div>
			<div class="next-bt-box">
				<a href="###" class="next-bt"></a>
			</div>
		</div>
		<div class="mask" style="display: none"></div>
		<div class="model-big" style="display: none">
			<div class="model-bg-t"></div>
			<div class="model-big-inner">
				<img src="" />
			</div>
			<div class="model-bg-b"></div>
		</div>
		<?php
		echo $this->render('common/footer.phtml');
		?>
		<?php
		echo $this->render('common/script.phtml');
		?>
		</div>
	</body>
</html>
